upstream nacos-cluster {
    server {{ hostvars['nacos-cluster-1'].ansible_host }}:8848;
    server {{ hostvars['nacos-cluster-2'].ansible_host }}:8848;
    server {{ hostvars['nacos-cluster-3'].ansible_host }}:8848;
}

server {
    listen       8848;
    server_name  {{ ansible_host }};

    location / {
        proxy_pass http://nacos-cluster;
    }
}
